import {createRouter, createWebHistory} from "vue-router";



// @ts-ignore
const routers=[
    {
        path: '/',
        name: 'Home',
        // @ts-ignore
        component: () => import('@/pages/Home/Home.vue'),
        meta: { public: true },
    },
    {
        path: '/yycsh',
        name: 'yycsh',
        meta: { public: true },
        // @ts-ignore
        component: () => import('@/pages/Login/LogSign.vue'),
        children:[
            {
                path:'',
                name:'Login',
                // @ts-ignore
                component: () => import('@/pages/Login/Login.vue'),
                meta: { public: true },
            },
            {
                path:'sign',
                name:'Sign',
                // @ts-ignore
                component: () => import('@/pages/Login/Register.vue'),
                meta: { public: true },
            },
            {
                path:'forget',
                name:'Forget',
                // @ts-ignore
                component: () => import('@/pages/Login/ForgetRegister.vue'),
                meta: { public: true },
            },
        ]
    },
    {
        path: '/kefu',
        name: 'kefu',
        // @ts-ignore
        component: () => import('@/pages/chat/Home.vue'),
        meta: { public: true },
    },
    {
        path: '/shops',
        name: 'shops',
        // @ts-ignore
        component: () => import('@/pages/shop/ShopList.vue'),
        meta: { public: true },
    },
    {
        path: '/Shop/:id',
        name: 'shop',
        // @ts-ignore
        component: () => import('@/pages/shop/Shop.vue'),
        meta: { public: true },
    },
    {
        path: '/shopChat/:shopId',
        name: 'shopChat',
        // @ts-ignore
        component: () => import('@/pages/chat/ShopChat.vue'),
        meta: { public: true },
    },
    {
        path: '/account',
        name: 'account',
        // @ts-ignore
        component: () => import('@/pages/account/Main.vue'),
        meta: { public: true },
        children:[
            {
                path:'',
                name:'PersonalInfo',
                // @ts-ignore
                component: () => import('@/pages/account/PersonalInfo.vue'),
                meta: { public: true },
            },
            {
                path:'PersonalTradeInfo',
                name:'PersonalTradeInfo',
                // @ts-ignore
                component: () => import('@/pages/account/PersonalTradeInfo.vue'),
                meta: { public: true },
            },
            {
                path:'ReceivingAddress',
                name:'ReceivingAddress',
                // @ts-ignore
                component: () => import('@/pages/account/ReceivingAddress.vue'),
                meta: { public: true },
            }
        ]
    },
    {
        path: '/getAdress',
        name: 'getAdress',
        // @ts-ignore
        component: () => import('@/pages/getadress/GetAdress.vue'),
        meta: { public: true },
    },
    {
        path: '/alipay/return',
        name: 'alipayreturn',
        // @ts-ignore
        component: () => import('@/pages/pay/AlipaySuccess.vue'),
        meta: { public: true },
    },
    {
        path: '/msShop',
        name: 'msshop',
        // @ts-ignore
        component: () => import('@/pages/shop/ShopMS.vue'),
        meta: { public: true },
    },
    {
        path: '/msUser',
        name: 'msUser',
        // @ts-ignore
        component: () => import('@/pages/user/UserMS.vue'),
        meta: { public: true },
    },
    {
        path: '/OrderView',
        name: 'OrderView',
        // @ts-ignore
        component: () => import('@/pages/order/OrderView.vue'),
        meta: { public: true },
    },
    {
        path: '/Pay',
        name: 'Pay',
        // @ts-ignore
        component: () => import('@/pages/order/Pay.vue'),
        meta: { public: true },
    },
    {
        path: '/ShopCar',
        name: 'ShopCar',
        // @ts-ignore
        component: () => import('@/pages/shopCat/ShopCar.vue'),
        meta: { public: true },
    },
    {
        path: '/productMain/:spId',
        name: 'productMain',
        // @ts-ignore
        component: () => import('@/pages/product/zhu.vue'),
        meta: { public: true },
    },

]
// @ts-ignore
const router = createRouter({
    history: createWebHistory(),
    // @ts-ignore
    routes: routers
})


export default router